<?php
class dbconn{




	public function connection(){
		//数据库连接 
        $servername = "localhost:3306";
        $db_user = "root";
        $db_psw = "";
        $db_name = "sugg";
        $conn = mysqli_connect($servername,$db_user,$db_psw,$db_name);
 
        
        if(!$conn)
        {
            exit('链接数据库失败!');
        }
        if(!mysqli_select_db($conn,$db_name))
        {
            exit(mysqli_errno().":".mysqli_error());
        }
        return $conn;
	}

	public function close(){
		//数据库关闭
	}

}